package com.epam.edu.task01.tourism.voucher;

import com.epam.edu.task01.tourism.residence.ResidenceInformation;
import com.epam.edu.task01.tourism.road.RoadInformation;

public class VoucherToRelax implements VoucherBuilder {
	private int id;
	private String country;
	private String city;
	private ResidenceInformation residenceInformation;
	private RoadInformation roadInformation;

	public VoucherToRelax(int id, String country, String city,
			ResidenceInformation residenceInformation,
			RoadInformation roadInformation) {
		super();
		this.id = id;
		this.country = country;
		this.city = city;
		this.residenceInformation = residenceInformation;
		this.roadInformation = roadInformation;
	}

	public String getCity() {
		return city;
	}

	@Override
	public int getVoucherCost() {
		return (this.residenceInformation.getCostOfResidence() + this.roadInformation
				.getCost() * 2) * 130 / 100;
	}

	public String getCountry() {
		return country;
	}

	public int getId() {
		return id;
	}

	public ResidenceInformation getResidenceInformation() {
		return residenceInformation;
	}

	public RoadInformation getRoadInformation() {
		return roadInformation;
	}

	@Override
	public String getVoucherType() {
		return "VoucherToRelax";
	}

	public void setCity(String city) {
		this.city = city;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setResidenceInformation(
			ResidenceInformation residenceInformation) {
		this.residenceInformation = residenceInformation;
	}

	public void setRoadInformation(RoadInformation roadInformation) {
		this.roadInformation = roadInformation;
	}

	@Override
	public String toString() {
		return "VoucherToRelax [id=" + id + ", country=" + country + ", city="
				+ city + ", residenceInformation=" + residenceInformation
				+ ", roadInformation=" + roadInformation + "]";
	}

}
